# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1FeatureValue do
  @moduledoc """
  Value for a feature.

  ## Attributes

  *   `boolArrayValue` (*type:* `GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1BoolArray.t`, *default:* `nil`) - A list of bool type feature value.
  *   `boolValue` (*type:* `boolean()`, *default:* `nil`) - Bool type feature value.
  *   `bytesValue` (*type:* `String.t`, *default:* `nil`) - Bytes feature value.
  *   `doubleArrayValue` (*type:* `GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1DoubleArray.t`, *default:* `nil`) - A list of double type feature value.
  *   `doubleValue` (*type:* `float()`, *default:* `nil`) - Double type feature value.
  *   `int64ArrayValue` (*type:* `GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1Int64Array.t`, *default:* `nil`) - A list of int64 type feature value.
  *   `int64Value` (*type:* `String.t`, *default:* `nil`) - Int64 feature value.
  *   `metadata` (*type:* `GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1FeatureValueMetadata.t`, *default:* `nil`) - Metadata of feature value.
  *   `stringArrayValue` (*type:* `GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1StringArray.t`, *default:* `nil`) - A list of string type feature value.
  *   `stringValue` (*type:* `String.t`, *default:* `nil`) - String feature value.
  *   `structValue` (*type:* `GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1StructValue.t`, *default:* `nil`) - A struct type feature value.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :boolArrayValue =>
            GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1BoolArray.t() | nil,
          :boolValue => boolean() | nil,
          :bytesValue => String.t() | nil,
          :doubleArrayValue =>
            GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1DoubleArray.t() | nil,
          :doubleValue => float() | nil,
          :int64ArrayValue =>
            GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1Int64Array.t() | nil,
          :int64Value => String.t() | nil,
          :metadata =>
            GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1FeatureValueMetadata.t() | nil,
          :stringArrayValue =>
            GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1StringArray.t() | nil,
          :stringValue => String.t() | nil,
          :structValue =>
            GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1StructValue.t() | nil
        }

  field(:boolArrayValue, as: GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1BoolArray)
  field(:boolValue)
  field(:bytesValue)
  field(:doubleArrayValue, as: GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1DoubleArray)
  field(:doubleValue)
  field(:int64ArrayValue, as: GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1Int64Array)
  field(:int64Value)
  field(:metadata, as: GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1FeatureValueMetadata)
  field(:stringArrayValue, as: GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1StringArray)
  field(:stringValue)
  field(:structValue, as: GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1StructValue)
end

defimpl Poison.Decoder, for: GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1FeatureValue do
  def decode(value, options) do
    GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1FeatureValue.decode(value, options)
  end
end

defimpl Poison.Encoder, for: GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1FeatureValue do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
